package com.group6.controller;
import com.group6.entity.Admission;
import com.group6.service.AdmissionService;
import com.group6.vo.AdmissionVo;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;


@RestController
@RequestMapping("/Admission")
public class AdmissionController {

    @Resource
    private AdmissionService admissionService;

    @RequestMapping("/AdmissionList")
    public List<Admission> admissionList(){

        return  admissionService.AdmissionList();
    }
    @RequestMapping("/AdmissionAdd")
    public String admissionList(@RequestBody AdmissionVo admissionVo){

        return  admissionService.AdmissionAdd(admissionVo);
    }
    @RequestMapping("/AdmissionUpdate")
    public String admissionUpdate(@RequestBody Admission admission){

        return  admissionService.AdmissionUpdate(admission);
    }
    @RequestMapping("/AdmissionDelete")
    public String admissionDelete(@RequestBody Admission admission){

        return  admissionService.AdmissionDelete(admission);
    }
}

